package com.xxy.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xxy.entity.Product;
import com.xxy.entity.dto.ProductQueryDTO;
import com.xxy.entity.vo.ChartLineVO;
import com.xxy.entity.vo.ProductVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ProductMapper extends BaseMapper<Product> {

    IPage<ProductVO> query(Page<ProductVO> page, @Param("query") ProductQueryDTO query);

    List<ProductVO> queryByFilter(@Param("query") ProductQueryDTO query);

    ProductVO queryById(Integer id);

    List<ProductVO> queryProductVoList(List<Long> productIds);

    List<ChartLineVO> selectProductCountByDate();
}
